{% load static %}

<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{% block title %}井冈山经贸学校{% endblock %}</title>
  <link href="{% static 'common/css/base.css' %}" rel="stylesheet">
  <link rel="icon" href="{% static 'common/images/favicon.ico' %}" type="image/x-icon">
  <link href="{% static 'common/css/layui.css' %}" rel="stylesheet">
  <script src="{% static 'common/js/layui.js' %}"></script>
  {% block style %}
  {% endblock %}
  <style>
    /* 设置页面水印 */
    body {
      position: relative;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Ctext x='50%25' y='50%25' font-size='20' fill='rgba(0,0,0,0.1)' text-anchor='middle' dominant-baseline='middle' transform='rotate(-45 100 100)'%3E{{ request.user.username }} {{ request.user.first_name }}%3C/text%3E%3C/svg%3E");
      background-repeat: repeat;
    }
  </style>
</head>

<body>
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <div class="layui-logo layui-hide-xs layui-bg-black">井冈山经贸学校</div>
      <!-- 头部区域（可配合layui 已有的水平导航） -->
      <ul class="layui-nav layui-layout-left">
        <!-- 移动端显示 -->
        <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
          <i class="layui-icon layui-icon-spread-left"></i>
        </li>
        <li class="layui-nav-item layui-hide-xs"><a href="{% url 'home' %}" target="_blank">学校首页</a></li>
      </ul>
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
          <a href="javascript:;">
            <img src="{% static 'common/images/favicon.ico' %}" class="layui-nav-img">
            姓名：{{ request.user.first_name }}
            &nbsp; | &nbsp;
            {% if is_student %}
            学号
            {% else %}
            工号
            {% endif %}
            ：{{ request.user.username }}
          </a>
        </li>
        <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
          <a href="{% url 'manage:logout' %}">注销</a>
        </li>
        <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
          <i class="layui-icon layui-icon-logout"></i>
        </li>
      </ul>
    </div>
    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test">
          <li class="layui-nav-item"><a href="{% url 'manage:index' %}">校内通知</a></li>
          {% if is_teacher %}
          <li class="layui-nav-item"><a href="{% url 'manage:eval_statistic' %}">评测统计</a></li>
          <li class="layui-nav-item"><a
              href="{% url 'manage:settings' %}">设&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;置</a></li>
          {% endif %}
          {% if is_admin %}
          <li class="layui-nav-item"><a href="{% url 'manage:data_import' %}">数据导入</a></li>
          <li class="layui-nav-item"><a href="/admin/" target="_blank">数据导出</a></li>
          {% endif %}
          {% if is_student %}
          <li class="layui-nav-item"><a href="javascript:;">教师评测</a></li>
          <li class="layui-nav-item"><a
              href="{% url 'manage:settings' %}">设&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;置</a></li>
          {% endif %}
        </ul>
      </div>
    </div>
    <div class="layui-body">
      <!-- 内容主体区域 -->
      <div style="padding: 15px;">
        <blockquote class="layui-elem-quote layui-text">
          {% block content-title %}
          Layui 框体布局内容主体区域
          {% endblock %}
        </blockquote>
        <div class="layui-card layui-panel" style="background-color: rgba(255, 255, 255, 0.1) !important;">
          {% block content %}
          正文内容
          {% endblock %}
        </div>
        <br><br>
      </div>
    </div>
    <div class="layui-footer">
      <!-- 底部固定区域 -->
      Copyright&nbsp;©&nbsp;2024 <a class="a-color" href="mailto:zhyoung@live.cn">
        <font weight="bold">Zhyoung, All Rights Reserved. Mail: zhyoung@live.cn</font>
      </a>
    </div>
  </div>

</body>

</html>